package com.tyk.bookstore.back.order.repository;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.tyk.bookstore.back.common.dal.mapper.IMapper;
import com.tyk.bookstore.back.order.model.dto.OrderBriefDto;
import com.tyk.bookstore.back.order.model.dto.OrderExplicitDto;
import com.tyk.bookstore.back.order.model.entity.OrderDo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * @author tyk
 * @description 订单管理
 */
@Mapper
public interface OrderRepository extends IMapper<OrderDo> {
    Long selectTotalWeightById(@Param("id") Long id);

    /**
     * 查询订单列表
     */
    List<OrderDo> selectListByParentId(@Param("parentId") Long parentId);

    /**
     * 查询订单简略信息
     */
    List<OrderBriefDto> selectOrderBriefDtoList(@Param("ew") LambdaQueryWrapper<OrderDo> wrapper);

    /**
     * 查询订单简略信息
     */
    List<OrderBriefDto> selectOrderBriefDtoListByIdList(@Param("idSet") Set<Long> idSet);

    /**
     * 查询订单详细详细
     */
    List<OrderExplicitDto> selectOrderExplicitDtoListByIdSet(@Param("idSet") Set<Long> idSet);
}
